package com.laozhao.mxbean;
/**
* @author 作者  zhaoyu E-mail:774463266@qq.com
* @version 创建时间：2019年2月11日 下午2:26:29
* @description 
*/
public class Server implements ServerMXBean {   
    
    /**  
     * 封装  
     */  
    private ServerConfigure serverConfigure;   
       
    public Server(ServerConfigure serverConfigure) {   
        this.serverConfigure = serverConfigure;   
    }   
       
    @Override  
    public ServerConfigure getServerConfigure() {   
        synchronized (serverConfigure) {   
            return this.serverConfigure;   
        }   
    }   
       
    @Override  
    public void setServerConfigure(ServerConfigure serverConfigure) {   
        synchronized (serverConfigure) {   
            this.serverConfigure = serverConfigure;   
        }   
    }   
       
    @Override  
    public void defaultServerConfigure() {   
        synchronized (serverConfigure) {   
            serverConfigure.setPort(80);   
            serverConfigure.setHost("www.haitao.com");   
            serverConfigure.setMinThread(10);   
            serverConfigure.setMaxThread(500);   
        }   
    }   
       
}  
